package cc.vv.btpartyjob.partymanager.adapter

import android.widget.ImageView
import android.widget.TextView
import cc.vv.baselibrary.adapter.SimpleCommonAdapter
import cc.vv.baselibrary.adapter.holder.ExtendViewHolder
import cc.vv.btpartyjob.partymanager.R
import cc.vv.btpartyjob.partymanager.moudel.bean.RedPartyBean
import cc.vv.lkimagecomponent2.LKImage
import cc.vv.lkimagecomponent2.lib.mode.ScaleMode

/**
 * 文化引领adapter
 * Created by Chen.qi on 2018/10/24.
 */
class CultureLeadAdapter(layoutResId: Int) : SimpleCommonAdapter<RedPartyBean>(layoutResId) {
    override fun convert(helper: ExtendViewHolder, item: RedPartyBean, position: Int) {
        //图片
        LKImage.load().scale(ScaleMode.CENTER_CROP)
                .crossFade(300).placeHolder(R.mipmap.icon_def_image)
                .error(R.mipmap.icon_def_image).load(item.cover).into(helper.getView<ImageView>(R.id.iv_icl_itemPic))

        //title
        helper.getView<TextView>(R.id.tv_icl_listTitle)?.text = item.title

        //时间
        helper.getView<TextView>(R.id.tv_icl_createTime)?.text = item.createTime


    }
}